
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author montassar
 */

public class HelloTag extends SimpleTagSupport {
private String format = "dd MMMM yyyy";
@Override
public void doTag() throws JspException, IOException {
// récupération du writer
JspWriter out = getJspContext().getOut();
// écriture dans le writer
out.print("L1: "+
new SimpleDateFormat(format).format(new Date())+"<br/>");
}
}

